package com.fance.highlight_spring4.ch2.el;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author fance
 * @date 18-5-5 下午5:15
 */
public class Main {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext configApplicationContext = new
                AnnotationConfigApplicationContext(ElConfig.class);

        DemoService service = configApplicationContext.getBean(DemoService.class);

        System.out.println(service.getAnother());
        System.out.println();
        ElConfig elConfig = configApplicationContext.getBean(ElConfig.class);
        elConfig.outputResource();
        configApplicationContext.close();
    }
}
